package me.softwareengineer.guice.rendering.listener;

/**
 * Triggered to notify about a sequence of special characters. Special symbols
 * are characters which are not interpreted as a part of a word (letters or
 * digits) or as a space. Note that the handling of these symbols requires
 * special attention because these symbols most frequently used to define text
 * formatting. Various wiki syntaxes use combinations of these sequences to
 * define structural elements in wiki documents.
 * 
 * <pre>
 * The full list of possible special symbols:
 *  "!",     "\"",     "#",     "$",     "%",     "&",     "'",     "(",  
 *  ")",     "*",      "+",     ",",     "-",     ".",     "/",     ":",  
 *  ";",     "<",      "=",     ">",     "?",     "@",     "[",     "\\", 
 *  "]",     "^",      "_",     "`",     "{",     "|",     "}",     "~"
 * </pre>
 * 
 * @author yadtahir
 * @see OnSpaceEvent
 * @see OnWordEvent <pre>
 * This class is thread-safe and immutable.
 * </pre>
 */
public class OnSpecialSymbolEvent extends Event implements OnElementEvent {
	/**
	 * Stores the special symbol
	 */
	private char specialSymbol;

	/**
	 * Creates an event and pass the special symbol
	 * 
	 * @param specialSymbol
	 */
	public OnSpecialSymbolEvent(char specialSymbol) {
		this.specialSymbol = specialSymbol;
	}

	/**
	 * 
	 * @return A special symbol ("*", "<", ">", "=", quote, etc). Any non alpha
	 *         numeric character is a special symbol.
	 * 
	 */
	public char getSpecialSymbol() {
		return this.specialSymbol;
	}
}
